package tk.tankpao.blast.core;

import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.Arrays;

import tk.tankpao.blast.core.annotation.Autowired;
import tk.tankpao.blast.core.annotation.Component;

@Component(name="tww")
public class Tww {
	
	public void dsdsd(int sadas, float s, String sd){
		
	}
	
	@Autowired(name="wtt")
	private Wtt wtt;
	
	@Autowired(name="wtt2")
	private Wtt2 wtt2;
	
	public void dd(){
		System.out.println("我出生了");
	}
	
	public void cc(){
		wtt.aa();
		wtt2.aa();
	}
	
	public static void main(String[] args) {
		Tww ss = new Tww();
		Method[] ms = ss.getClass().getMethods();
		for(Method m : ms ){
			if(m.getName().equals("dsdsd")){
				Class[] clazzs = m.getParameterTypes();
				Parameter[] ps = m.getParameters();
				Arrays.asList(ps).forEach(p -> {
					System.out.println(p.getName());
				});
				
				Arrays.asList(clazzs).forEach(clazz ->{
					System.out.println(clazz.getName());
				});
			}
		}
	}
}
